package com.example.android.BluetoothChat.bean;

import java.io.Serializable;

public class Game implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((_id == null) ? 0 : _id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Game other = (Game) obj;
		if (_id == null) {
			if (other._id != null)
				return false;
		} else if (!_id.equals(other._id))
			return false;
		return true;
	}

	public String getName() {
		return _name;
	}

	public void setName(String parName) {
		this._name = parName;
	}

	public Long getId() {
		return _id;
	}

	public void setId(Long parId) {
		this._id = parId;
	}

	private String _name;
	private Long _id;
	
	public Game(){
		
	}
	
	public Game(String parName, Long parId){
		_name = parName;
		_id = parId;
	}
	
	@Override
	public String toString() {
		return getName();
	}
}
